﻿<div class="widget">
    <div class="widget-header">
        <h3><i class="fa fa-edit"></i> 查看客户留言</h3>
    </div>
    <div class="widget-content">
        <form class="form-horizontal" role="form">
            <fieldset>
                <div class="form-group">
                    <label class="col-sm-2 control-label text-right">问题编号：</label>
                    <div class="col-sm-4">
                        <label class="control-label">{{data.messageNumber}}</label>
                    </div>
                    <label class="col-sm-2 control-label text-right">创建日期：</label>
                    <div class="col-sm-4">
                        <label class="control-label">{{data.indate | date:'MM/dd/yyyy HH:mm:ss'}}</label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label text-right">问题类别：</label>
                    <div class="col-sm-4">
                        <label class="control-label">{{data._messageType}}</label>
                    </div>
                    <label class="col-sm-2 control-label text-right">问题状态：</label>
                    <div class="col-sm-4">
                        <label class="control-label" ng-if="logs.length>0">已转交</label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label text-right">收货仓库：</label>
                    <div class="col-sm-4">
                        <label class="control-label">{{data._receivedWarehouseName}}</label>
                    </div>
                </div>
            </fieldset>
            <fieldset>
                <legend>问题描述</legend>
                <div class="form-group">
                    <label class="col-sm-2 control-label text-right">客户编号：</label>
                    <div class="col-sm-4">
                        <label class="control-label">
                            <a href="javascript:void(0);" ng-click="btnOpenDetail(item,'customerdetail')">
                                {{data.customerNumber}}</a>
                        </label>
                    </div>
                    <label class="col-sm-2 control-label text-right">订单编号：</label>
                    <div class="col-sm-4">
                        <a href="javascript:void(0);" ng-click="btnViewCustomer(data.orderNumber);">
                            <label class="control-label">{{data.orderNumber}}</label>
                        </a>

                    </div>
                </div>


                <div class="form-group">
                    <label class="col-sm-2 control-label text-right">运单号码：</label>
                    <div class="col-sm-4">
                        <label class="control-label">{{data.receiveTrackingNumber}}</label>
                    </div>
                    <label class="col-sm-2 control-label text-right">发货单号：</label>
                    <div class="col-sm-4">
                        <label class="control-label">{{data.deliveryTrackingNumber}}</label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label text-right">问题内容：</label>
                    <div class="col-sm-10">
                        <label class="control-label">{{data.message}}</label>
                    </div>
                </div>
            </fieldset>
            <legend>转交问题</legend>
            <div>
                <table class="table">
                    <tr>
                        <th class="col-sm-1">转交时间</th>
                        <th class="col-sm-1">转交人</th>
                        <th class="col-sm-1">转交原因</th>
                    </tr>
                    <tr ng-repeat="log in logs">
                        <td class="col-sm-1">{{log.operationDate | date:'yyyy-MM-dd hh:mm:ss'}}</td>
                        <td class="col-sm-1">{{log.operationUserName}}</td>
                        <td class="col-sm-1">{{log.typeName}}</td>

                    </tr>
                </table>
            </div>
            <fieldset>
                <legend>问题留言</legend>
                <div class="form-group">
                    <label class="col-sm-2 control-label text-right">回复记录：</label>
                    <div class="row col-sm-4">
                        <div style=" margin-bottom:10px;" ng-repeat="item in messageLogs">
                            <div class="col-sm-6 blue">{{item.operationUserName}}</div>
                            <div class="col-sm-6 text-right">{{item.operationDate | date:'MM/dd/yyyy HH:mm:ss'}}</div>
                            <div class="col-sm-12">{{item.message}}</div>
                            <div class="clearfix"></div>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label text-right">您的回复：</label>
                    <div class="col-sm-4">
                        <textarea class="form-control" ng-model="_message"></textarea>
                    </div>
                    <button type="button" class="btn btn-default" ng-click="btnMessagePush()"><i class="fa fa-comment"></i>回复</button>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label text-right">转交问题：</label>
                    <div class="col-sm-4">
                        <select type="text" class="form-control" ng-change="getProduct()" ng-model="search.messageType" ng-options="messageType as messageType.typeName for messageType in messageTypeList">
                       <option></option>
                        </select>
                    </div>
                    <button type="button" class="btn btn-default" ng-click="setMessageLog()"><i class="fa fa-comment"></i>转交问题</button>
                </div>

    </div>
    </fieldset>
    <div class="form-group text-center">
        <!--<button type="button" class="btn btn-primary" class="role" data-role="32" ng-click="btnUpdateStatus('ForwardWH')">转交仓库</button>-->
        <button type="button" class="btn btn-primary" class="role" data-role="31" ng-click="btnUpdateStatus('Closed')" ng-if="data.status!='Closed'">关闭问题</button>
        <button type="button" class="btn btn-default" ng-click="btnPrev()"><i class="fa fa-reply"></i>返回</button>
    </div>
    </form>
</div>
</div>